<template>
  <div class="min-h-screen bg-gray-50 flex flex-col items-center justify-center p-4">
    <div class="text-center">
      <h1 class="text-9xl font-bold text-blue-500">404</h1>
      <div class="text-2xl font-medium text-gray-700 mt-4 mb-8">页面未找到</div>
      <p class="text-gray-500 mb-8">抱歉，您访问的页面不存在或已被移除</p>
      <el-button type="primary" @click="goHome">返回首页</el-button>
    </div>
    
    <!-- <div class="mt-12 max-w-md">
      <div class="text-sm text-gray-500 mb-2">您可能想要访问：</div>
      <div class="grid grid-cols-2 gap-4">
        <div 
          v-for="(link, index) in suggestedLinks" 
          :key="index"
          class="p-3 bg-white rounded-lg shadow-sm border border-gray-100 hover:shadow-md transition-shadow cursor-pointer"
          @click="router.push(link.path)"
        >
          <div class="flex items-center">
            <el-icon class="mr-2 text-blue-500"><component :is="link.icon" /></el-icon>
            <span>{{ link.name }}</span>
          </div>
        </div>
      </div>
    </div> -->
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router';
import { HomeFilled, Reading, Monitor, User } from '@element-plus/icons-vue';

const router = useRouter();

const suggestedLinks = [
  { name: '首页', path: '/homeFilled', icon: 'HomeFilled' },
  { name: '智能测试', path: '/analysis', icon: 'Monitor' },
  { name: '试题宝库', path: '/question', icon: 'Reading' },
  { name: '个人中心', path: '/profile', icon: 'User' }
];

const goHome = () => {
  router.push('/homeFilled');
};
</script>

<style scoped>
/* 添加一些动画效果 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.text-9xl {
  font-size: 9rem;
  line-height: 1;
  animation: fadeIn 0.5s ease-out;
}

.text-2xl {
  animation: fadeIn 0.5s ease-out 0.2s forwards;
  opacity: 0;
}

p {
  animation: fadeIn 0.5s ease-out 0.4s forwards;
  opacity: 0;
}

.el-button {
  animation: fadeIn 0.5s ease-out 0.6s forwards;
  opacity: 0;
}

.max-w-md {
  animation: fadeIn 0.5s ease-out 0.8s forwards;
  opacity: 0;
}
</style>